<template>
  <a-modal
    title="物流订单信息"
    :width="700"
    :visible="visible"
    :confirmLoading="loading"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <a-spin :spinning="loading">
      <a-form :form="form" v-bind="formLayout">
        <a-form-item label="设置订单备注"  v-if="model">
          <a-textarea v-model="model.remark" placeholder="请填写备注" />
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
import { mapGetters } from 'vuex'
import formModalMixin from '@/mixins/formModalMixin'
import { expressOrderCreate } from '@/api/jd'
// 表单字段
const fields = ['id', 'number']

export default {
  mixins: [formModalMixin],
  components: {
  },
  data () {
    this.fields = fields
    this.editAction = expressOrderCreate
    return {
      loadingImg: false,
      formLayout: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 15 }
        }
      }
    }
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  methods: {
    handleOkBefore (values) {
      return { ...this.model, ...values }
    }
  }
}
</script>

<style lang="less" scoped>
.code-btn {
  position: absolute;
  right: 0;
  top: 4px;
}
/deep/.ant-modal-body {
  min-height: 300px;
  padding: 24px 50px;
}
</style>
